#include <GameEngine/Gameplay/Objects/object_world.h>


#ifdef GAMEENGINE_NAMESPACES
namespace GameEngine {
#endif

#ifndef DOXYGEN_IGNORE
#include "object_world.moc"
#endif

//=================================================================================


GAMEENGINE_IMPLEMENT_RTTI(ObjectWorld)

//! Default constructor
ObjectWorld::ObjectWorld() : ObjectBase() {}

//! Copy constructor
/*!
 @param rhs The object to copy
 */
ObjectWorld::ObjectWorld(const ObjectWorld& rhs) : pos_(rhs.pos_), ObjectBase(rhs) {}

//! Assignment operator
/*!
 @param rhs The object to copy
 */
ObjectWorld& ObjectWorld::operator=(const ObjectWorld& rhs) {
	if ( &rhs != this ) {
		ObjectBase::operator=(rhs);
		pos_ = rhs.pos_;
	}
	return *this;
}

//! Destructor
ObjectWorld::~ObjectWorld() {}

//! Accessor to the position of the object (read only)
/*!
 @return A constant reference to the position of the object
 */
const Point3d<float>& ObjectWorld::pos() const {
	return pos_;
}

//! Accessor to the position of the object (read-write)
/*!
 @return A reference to the position of the object
 */
Point3d<float>& ObjectWorld::pos() {
	return pos_;
}

#ifdef GAMEENGINE_NAMESPACES
} // namespace GameEngine
#endif
